﻿using System;
using System.Collections.Generic;

using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using SurveyHost.Core;

namespace SurveyHost.Web.Participant
{
    public partial class NonParticipating : System.Web.UI.Page
    {
        /// <summary>
        /// Handles the Load event of the Page control.
        /// </summary>
        /// <param name="sender">The source of the event.</param>
        /// <param name="e">The <see cref="System.EventArgs"/> instance containing the event data.</param>
        protected void Page_Load(object sender, EventArgs e)
        {
            if (User.IsInRole("Admin")) return;

            Guid id = WebUtil.CurrentUserId();
            if (!StatusHelper.UserIsValid(id)) return;
            Response.Redirect("Survey.aspx", true);
        }
    }
}
